package com.itheima.demo2;

import java.time.LocalDateTime;
import java.time.LocalTime;

public class TimeDemo {
    public static void main(String[] args) {
        LocalDateTime newTime = LocalDateTime.now();
        System.out.println("当前时间为:"+newTime);
        /*LocalDateTime dateTime = LocalDateTime.of(2020, 12, 31, 7, 38, 46);
        System.out.println("年份值为:"+dateTime.getYear());*/
        LocalDateTime newTime1 = LocalDateTime.now();
        System.out.println("当前时间为:"+newTime1);
    }
}
